The history of El Salvador begins with several distinct groups of Mesoamerican people, especially the Pipil, the Lenca and the Maya. In the early 16th century, the Spanish Empire conquered the territory, incorporating it into the Viceroyalty of New Spain ruled from Mexico City. In 1821, El Salvador achieved independence from Spain as part of the First Mexican Empire, only to further secede as part of the Federal Republic of Central America two years later. Upon the republic's independence in 1841, El Salvador became a sovereign state until forming a short-lived union with Honduras and Nicaragua called the Greater Republic of Central America, which lasted from 1895 to 1898.[1][2][3]
In the 20th century, El Salvador endured chronic political and economic instability characterized by coups, revolts, and a succession of authoritarian rulers caused by the intervention of the United States. Persistent socioeconomic inequality and civil unrest culminated in the devastating Salvadoran Civil War in the 1980s, which was fought between the military-led government and a coalition of left-wing guerrilla groups. The conflict ended in 1992 with a negotiated settlement that established a multiparty constitutional republic, which remains in place to this day.
El Salvador's economy was historically dominated by agriculture, beginning with the indigo plant (añil in Spanish), the most important crop during the colonial period,[4][5] and followed thereafter by coffee, which by the early 20th century accounted for 90 percent of export earnings.[6][7]